package com.esp.studentManagementSystem.repository;

import com.esp.studentManagementSystem.pojo.po.entity.SysUser;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserRepository extends JpaRepository<SysUser, Long> {

    @Query(value = "SELECT * FROM sys_user WHERE username = :username", nativeQuery = true)
    SysUser getSysUserByUsername(@Param("username") String username);
}
